home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Code Resources / SliderCDEF 1.0 / SliderCDEF Source ƒ / SliderCalcCntlRgn.c next >
Encoding:
C/C++ Source or Header  |  1993-12-10  |  665 b   |  19 lines  |  [TEXT/KAHL]

  1. #include "SliderCDEF.h"
  2.  
  3. // SliderCalcCntlRgn
  4. //
  5. // Calculates the entire control's region which is just the control rectangle for
  6. // the slider control. Note: the calcCntlRgn message is only sent by the control
  7. // manager when running in 32-bit mode. Under 24-bit mode the single message
  8. // calcCRgns is sent for all region calculations.
  9. void SliderCalcCntlRgn( short varCode, ControlHandle theControl, long param )
  10. {
  11.     // Lock the control handle.
  12.     HLock( (Handle) theControl );
  13.  
  14.     // Put a handle to the slider's control region into param.
  15.     RectRgn( (RgnHandle) param, &(**theControl).contrlRect );
  16.  
  17.     // Unlock the control handle.
  18.     HUnlock( (Handle) theControl );
  19. }